package com.glepoch.springbootsecuritymybatis.compoment.easyexcel.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glepoch.springbootsecuritymybatis.compoment.easyexcel.SexConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;




@Data
public class StudentEntity implements Serializable {

    @ExcelIgnore// 忽略此字段
    private String id;

    @ColumnWidth(10)//设置宽度
    @ExcelProperty(value = {"学生表","基本信息","姓名"},index = 0)//设置表头、字段、排序
    private String name;

    //converter 设置格式化（字典转换）器
    //SexConverter 自定义转换器
    @ExcelProperty(value = {"学生表","基本信息","性别"},index = 1,converter = SexConverter.class)
    private Integer sex;

    @ExcelProperty(value = {"学生表","注册日期"},index = 2)
    private Date regDate;

}
